knitr::opts_chunk$set(echo = TRUE)
rm(list = ls())
#cmdstanr::set_cmdstan_path(path = "C:/Users/kueng/.cmdstan/cmdstan-2.35.0")
#cmdstanr::set_cmdstan_path(path = "C:/Users/pascku/.cmdstan/cmdstan-2.36.0")
library(tidyverse)
library(R.utils)
library(wbCorr)
library(readxl)
library(kableExtra)
library(brms)
library(bayesplot)
library(see)
library(beepr)
library(DHARMa)
library(digest)
source(file.path('Functions', 'ReportModels.R'))
source(file.path('Functions', 'PrettyTables.R'))
source(file.path('Functions', 'ReportMeasures.R'))
source(file.path('Functions', 'PrepareData.R'))
report_function_hash <- digest::digest(summarize_brms)## [1] 1116
# Set options for analysis
use_mi = FALSE
shutdown = FALSE
report_ordinal = FALSE
do_priorsense = FALSE
get_bayesfactor = TRUE
check_models = TRUE #
if (get_bayesfactor) {
stats_to_report <- c('CI', 'SE', 'pd', 'ROPE', 'BF', 'Rhat', 'ESS')
} else {
stats_to_report <- c('CI', 'SE', 'pd', 'ROPE', 'Rhat', 'ESS')
}
options(
dplyr.print_max = 100,
brms.backend = 'cmdstan',
brms.file_refit = ifelse(use_mi, 'never', 'on_change'),
brms.file_refit = 'on_change',
#brms.file_refit = 'always',
error = function() {
beepr::beep(sound = 5)
if (shutdown) {
system("shutdown /s /t 180")
quit(save = "no", status = 1)
}
}
, es.use_symbols = TRUE
)
####################### Model parameters #######################
iterations = 12000 # 12'000 per chain to achieve 40'000
warmup = 2000 # 2000
# NO AR!!!
#corstr = 'ar'
#corstr = 'cosy_couple'
#corstr = 'cosy_couple:user'
################################################################
suffix = paste0('_sensitivitySupport_', as.character(iterations))df <- openxlsx::read.xlsx(file.path('long.xlsx'))
df_original <- df
df_double <- prepare_data(df, recode_pushing = TRUE, use_mi = use_mi)[[1]]Constructing scales Re-coding pusing reshaping data (4field) centering data within and between
Min. 1st Qu. Median Mean 3rd Qu. Max. NA’s 0.0000 0.0000 0.0000 0.1649 0.0000 5.0000 275
# For indistinguishable Dyads
model_rows_fixed <- c(
'Intercept',
# '-- WITHIN PERSON MAIN EFFECTS --',
'persuasion_self_cw',
'persuasion_partner_cw',
'pressure_self_cw',
'pressure_partner_cw',
'pushing_self_cw',
'pushing_partner_cw',
'day',
'plan_selfPlan',
'plan_partnerPlan',
'weartime_self_cw',
'support_self_cw',
'support_partner_cw',
'isWeekendWeekend',
'got_JITAI_selfJITAIreceived',
'skilled_supportDaysafterIntervention',
# '-- BETWEEN PERSON MAIN EFFECTS',
'persuasion_self_cb',
'persuasion_partner_cb',
'pressure_self_cb',
'pressure_partner_cb',
'pushing_self_cb',
'pushing_partner_cb',
'weartime_self_cb',
'support_self_cb',
'support_partner_cb',
'studyGroupFirst3weeksinterventions',
'studyGrouplast3weeksinterventions'
)
model_rows_fixed_ordinal <- c(
model_rows_fixed[1],
'Intercept[1]',
'Intercept[2]',
'Intercept[3]',
'Intercept[4]',
'Intercept[5]',
model_rows_fixed[2:length(model_rows_fixed)]
)
model_rows_random <- c(
# '--------------',
# '-- RANDOM EFFECTS --',
'sd(Intercept)',
'sd(persuasion_self_cw)',
'sd(persuasion_partner_cw)',
'sd(pressure_self_cw)',
'sd(pressure_partner_cw)',
'sd(pushing_self_cw)',
'sd(pushing_partner_cw)',
# '-- CORRELATION STRUCTURE -- ',
'sigma'
)
model_rows_random_ordinal <- c(model_rows_random,'disc')# For indistinguishable Dyads
model_rownames_fixed <- c(
"Intercept",
# "-- WITHIN PERSON MAIN EFFECTS --",
"Daily individual's experienced persuasion",
"Daily partner's experienced persuasion",
"Daily individual's experienced pressure",
"Daily partner's experienced pressure",
"Daily individual's experienced pushing",
"Daily partner's experienced pushing",
"Day",
"Own Actionplan",
'Partner Actionplan',
"Daily weartime",
'Daily support received',
"Daily support provided (partner's view)",
'Is a Weekend',
'JITAI received',
'Days post skilled support intervention',
# "-- BETWEEN PERSON MAIN EFFECTS",
"Mean individual's experienced persuasion",
"Mean partner's experienced persuasion",
"Mean individual's experienced pressure",
"Mean partner's experienced pressure",
"Mean individual's experienced pushing",
"Mean partner's experienced pushing",
"Mean weartime",
"Mean individual's received support",
"Mean partner's received support",
'Difference study group 2',
'Difference study group 3'
)
model_rownames_fixed_ordinal <- c(
model_rownames_fixed[1],
'Intercept[1]',
'Intercept[2]',
'Intercept[3]',
'Intercept[4]',
'Intercept[5]',
model_rownames_fixed[2:length(model_rownames_fixed)]
)
model_rownames_random <- c(
# '--------------',
# '-- RANDOM EFFECTS --',
'sd(Intercept)',
"sd(Daily individual's experienced persuasion)",
"sd(Daily partner's experienced persuasion)", # OR partner received
"sd(Daily individual's experienced pressure)",
"sd(Daily partner's experienced pressure)",
"sd(Daily individual's experienced pushing)",
"sd(Daily partner's experienced pushing)",
# '-- CORRELATION STRUCTURE -- ',
'sigma'
)
model_rownames_random_ordinal <- c(model_rownames_random,'disc')rows_to_pack <- list(
"Within-Person Effects" = c(2,16),
"Between-Person Effects" = c(17,27),
"Random Effects" = c(28, 34),
"Additional Parameters" = c(35,35)
)
rows_to_pack_ordinal <- list(
"Intercepts" = c(1,6),
"Within-Person Effects" = c(2+5,16+5),
"Between-Person Effects" = c(17+5,27+5),
"Random Effects" = c(28+5, 34+5),
"Additional Parameters" = c(35+5,35+6)
)formula <- bf(
pa_sub ~
persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw +
support_self_cw + support_partner_cw +
#isWeekend +
#got_JITAI_self +
#skilled_support +
persuasion_self_cb + persuasion_partner_cb +
pressure_self_cb + pressure_partner_cb +
pushing_self_cb + pushing_partner_cb +
support_self_cb + support_partner_cb +
#studyGroup +
plan_self + plan_partner +
day +
# Random effects
(1 + persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw | dd | coupleID),
hu = ~ persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw +
support_self_cw + support_partner_cw +
#isWeekend +
#got_JITAI_self +
#skilled_support +
persuasion_self_cb + persuasion_partner_cb +
pressure_self_cb + pressure_partner_cb +
pushing_self_cb + pushing_partner_cb +
support_self_cb + support_partner_cb +
#studyGroup +
plan_self + plan_partner +
day +
# Random effects
(1 + persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw | dd | coupleID)
, decomp = 'QR'
#, autocor = autocor_str
)
prior1 <- c(
brms::set_prior("normal(0, 2.5)", class = "b")
, brms::set_prior("normal(0, 2)", class = "b", dpar = "hu")
, brms::set_prior("normal(0, 50)", class = "Intercept") # for non-zero PA
, brms::set_prior("normal(0.5, 2.5)", class = "Intercept", dpar = 'hu') # hurdle part
, brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0)
, brms::set_prior("student_t(3, 0, 2.5)", class = "sigma", lb = 0)
)
#brms::validate_prior(
# prior1,
# formula = formula,
# data = df_double,
# family = hurdle_lognormal()
#)
#df_minimal <- df_double[, c("AorB", all.vars(as.formula(formula)))]
pa_sub <- my_brm(
mi = use_mi,
imputed_data = implist,
formula = formula,
prior = prior1,
data = df_double,
family = brms::hurdle_lognormal(),
#family = brms::hurdle_negbinomial(),
#family = brms::hurdle_poisson(),
#control = list(adapt_delta = 0.95, max_treedepth = 15),
iter = iterations,
warmup = warmup,
chains = 4,
cores = 4,
seed = 42,
file = file.path("models_cache_brms", paste0("pa_sub_hu_lognormal", suffix))
#, file_refit = 'always'
)## Warning: Rows containing NAs were excluded from the model.
# rope range for continuous part of the model
rope_factor <- sd(log(pa_sub$data$pa_sub[pa_sub$data$pa_sub > 0]))
rope_range_continuous = c(-0.1 * rope_factor, 0.1 * rope_factor)
summary_pa_sub <- summarize_brms(
pa_sub,
stats_to_report = stats_to_report,
rope_range = rope_range_continuous,
hu_rope_range = c(-0.18, 0.18),
model_rows_fixed = model_rows_fixed,
model_rows_random = model_rows_random,
model_rownames_fixed = model_rownames_fixed,
model_rownames_random = model_rownames_random,
exponentiate = T) ## Sampling priors, please wait...
## Warning in summarize_brms(pa_sub, stats_to_report = stats_to_report, rope_range
## = rope_range_continuous, : Coefficients were exponentiated. Double check if
## this was intended.
| exp(Est.)_hu | SE_hu | 95% CI_hu | pd_hu | ROPE_hu | inside ROPE_hu | BF_hu | BF_Evidence_hu | Rhat_hu | Bulk_ESS_hu | Tail_ESS_hu | exp(Est.)_nonzero | SE_nonzero | 95% CI_nonzero | pd_nonzero | ROPE_nonzero | inside ROPE_nonzero | BF_nonzero | BF_Evidence_nonzero | Rhat_nonzero | Bulk_ESS_nonzero | Tail_ESS_nonzero | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Intercept | 0.23*** | 0.04 | [ 0.16, 0.33] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 29495 | 29225 | 33.94*** | 2.87 | [28.67, 40.15] | 1.000 | [0.92, 1.08] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 12391 | 20610 |
| Within-Person Effects | ||||||||||||||||||||||
| Daily individual’s experienced persuasion | 1.20** | 0.09 | [ 1.04, 1.40] | 0.995 | [0.84, 1.20] | 0.492 | 0.955 | Weak Evidence for Null | 1.000 | 41254 | 30051 | 0.99 | 0.03 | [ 0.94, 1.05] | 0.597 | [0.92, 1.08] | 0.994 | 0.009 | Very Strong Evidence for Null | 1.000 | 26446 | 30088 |
| Daily partner’s experienced persuasion | 1.09 | 0.08 | [ 0.95, 1.26] | 0.892 | [0.84, 1.20] | 0.905 | 0.075 | Strong Evidence for Null | 1.000 | 41723 | 29653 | 1.00 | 0.02 | [ 0.96, 1.05] | 0.541 | [0.92, 1.08] | 0.998 | 0.008 | Very Strong Evidence for Null | 1.000 | 31501 | 32090 |
| Daily individual’s experienced pressure | 0.93 | 0.16 | [ 0.65, 1.35] | 0.664 | [0.84, 1.20] | 0.651 | 0.095 | Strong Evidence for Null | 1.000 | 39856 | 31479 | 0.91 | 0.05 | [ 0.82, 1.01] | 0.968 | [0.92, 1.08] | 0.371 | 0.044 | Strong Evidence for Null | 1.000 | 38574 | 35581 |
| Daily partner’s experienced pressure | 1.68* | 0.41 | [ 1.07, 3.13] | 0.988 | [0.84, 1.20] | 0.070 | 1.482 | Weak Evidence | 1.000 | 31408 | 25026 | 0.95 | 0.04 | [ 0.87, 1.04] | 0.872 | [0.92, 1.08] | 0.741 | 0.012 | Very Strong Evidence for Null | 1.000 | 40995 | 36695 |
| Daily individual’s experienced pushing | 0.88 | 0.13 | [ 0.66, 1.20] | 0.807 | [0.84, 1.20] | 0.611 | 0.115 | Moderate Evidence for Null | 1.000 | 34900 | 30955 | 0.97 | 0.03 | [ 0.91, 1.03] | 0.827 | [0.92, 1.08] | 0.928 | 0.011 | Very Strong Evidence for Null | 1.000 | 40842 | 33372 |
| Daily partner’s experienced pushing | 1.21 | 0.15 | [ 0.97, 1.58] | 0.951 | [0.84, 1.20] | 0.458 | 0.225 | Moderate Evidence for Null | 1.000 | 42283 | 29601 | 0.95 | 0.03 | [ 0.89, 1.01] | 0.945 | [0.92, 1.08] | 0.835 | 0.024 | Very Strong Evidence for Null | 1.000 | 40857 | 31741 |
| Day | 0.87 | 0.14 | [ 0.64, 1.20] | 0.798 | [0.84, 1.20] | 0.588 | 0.114 | Moderate Evidence for Null | 1.000 | 64993 | 28829 | 0.99 | 0.06 | [ 0.88, 1.12] | 0.569 | [0.92, 1.08] | 0.790 | 0.007 | Very Strong Evidence for Null | 1.000 | 56964 | 27898 |
| Own Actionplan | 10.93*** | 1.21 | [ 8.83, 13.57] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 49846 | 32183 | 1.37*** | 0.06 | [ 1.24, 1.50] | 1.000 | [0.92, 1.08] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 63390 | 31481 |
| Partner Actionplan | 1.02 | 0.11 | [ 0.83, 1.25] | 0.576 | [0.84, 1.20] | 0.906 | 0.055 | Strong Evidence for Null | 1.000 | 55007 | 31440 | 1.03 | 0.04 | [ 0.95, 1.13] | 0.786 | [0.92, 1.08] | 0.841 | 0.010 | Very Strong Evidence for Null | 1.000 | 62818 | 30266 |
| Daily weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Daily support received | 1.72*** | 0.08 | [ 1.57, 1.90] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 62286 | 31359 | 1.07*** | 0.01 | [ 1.05, 1.10] | 1.000 | [0.92, 1.08] | 0.713 | >100 | Overwhelming Evidence | 1.000 | 69262 | 30150 |
| Daily support provided (partner’s view) | 1.39*** | 0.06 | [ 1.28, 1.52] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 60768 | 30929 | 1.05*** | 0.01 | [ 1.02, 1.08] | 1.000 | [0.92, 1.08] | 0.991 | 2.975 | Weak Evidence | 1.000 | 66883 | 30244 |
| Is a Weekend | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| JITAI received | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Days post skilled support intervention | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Between-Person Effects | ||||||||||||||||||||||
| Mean individual’s experienced persuasion | 1.28 | 0.53 | [ 0.55, 2.88] | 0.726 | [0.84, 1.20] | 0.281 | 0.250 | Moderate Evidence for Null | 1.000 | 20505 | 23790 | 0.88 | 0.14 | [ 0.63, 1.21] | 0.796 | [0.92, 1.08] | 0.268 | 0.021 | Very Strong Evidence for Null | 1.000 | 19477 | 26720 |
| Mean partner’s experienced persuasion | 1.06 | 0.43 | [ 0.46, 2.40] | 0.556 | [0.84, 1.20] | 0.338 | 0.211 | Moderate Evidence for Null | 1.000 | 20027 | 24267 | 0.91 | 0.15 | [ 0.66, 1.25] | 0.720 | [0.92, 1.08] | 0.324 | 0.017 | Very Strong Evidence for Null | 1.000 | 19099 | 25945 |
| Mean individual’s experienced pressure | 0.14*** | 0.09 | [ 0.04, 0.45] | 1.000 | [0.84, 1.20] | 0.001 | 57.145 | Very Strong Evidence | 1.000 | 26871 | 26711 | 0.77 | 0.30 | [ 0.36, 1.67] | 0.749 | [0.92, 1.08] | 0.127 | 0.029 | Very Strong Evidence for Null | 1.000 | 8253 | 13441 |
| Mean partner’s experienced pressure | 0.31* | 0.19 | [ 0.09, 0.95] | 0.980 | [0.84, 1.20] | 0.033 | 2.297 | Weak Evidence | 1.000 | 27415 | 28828 | 0.53 | 0.20 | [ 0.25, 1.15] | 0.949 | [0.92, 1.08] | 0.041 | 0.092 | Strong Evidence for Null | 1.000 | 7975 | 12814 |
| Mean individual’s experienced pushing | 0.76 | 0.49 | [ 0.21, 2.74] | 0.665 | [0.84, 1.20] | 0.204 | 0.355 | Weak Evidence for Null | 1.000 | 25089 | 27668 | 1.46 | 0.41 | [ 0.83, 2.60] | 0.907 | [0.92, 1.08] | 0.090 | 0.038 | Strong Evidence for Null | 1.000 | 11241 | 18487 |
| Mean partner’s experienced pushing | 1.60 | 1.03 | [ 0.45, 5.78] | 0.766 | [0.84, 1.20] | 0.172 | 0.418 | Weak Evidence for Null | 1.000 | 25900 | 28214 | 1.46 | 0.42 | [ 0.82, 2.60] | 0.907 | [0.92, 1.08] | 0.089 | 0.038 | Strong Evidence for Null | 1.000 | 11136 | 18119 |
| Mean weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Mean individual’s received support | 1.30 | 0.17 | [ 1.00, 1.70] | 0.974 | [0.84, 1.20] | 0.270 | 0.458 | Weak Evidence for Null | 1.000 | 31548 | 30347 | 1.12* | 0.05 | [ 1.02, 1.23] | 0.992 | [0.92, 1.08] | 0.211 | 0.199 | Moderate Evidence for Null | 1.000 | 22399 | 28707 |
| Mean partner’s received support | 1.48** | 0.20 | [ 1.14, 1.92] | 0.998 | [0.84, 1.20] | 0.056 | 5.131 | Moderate Evidence | 1.000 | 32403 | 31628 | 0.97 | 0.05 | [ 0.89, 1.07] | 0.736 | [0.92, 1.08] | 0.836 | 0.012 | Very Strong Evidence for Null | 1.000 | 19357 | 27492 |
| Difference study group 2 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Difference study group 3 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Random Effects | ||||||||||||||||||||||
| sd(Intercept) | 0.84 | 0.12 | [0.64, 1.13] | NA | NA | NA | NA | NA | 1.000 | 20837 | 25928 | 0.31 | 0.04 | [0.24, 0.42] | NA | NA | NA | NA | NA | 1.000 | 14876 | 21583 |
| sd(Daily individual’s experienced persuasion) | 0.17 | 0.11 | [0.01, 0.40] | NA | NA | NA | NA | NA | 1.000 | 13505 | 16363 | 0.11 | 0.02 | [0.07, 0.16] | NA | NA | NA | NA | NA | 1.000 | 23040 | 28271 |
| sd(Daily partner’s experienced persuasion) | 0.18 | 0.11 | [0.01, 0.41] | NA | NA | NA | NA | NA | 1.000 | 11114 | 12573 | 0.08 | 0.02 | [0.04, 0.13] | NA | NA | NA | NA | NA | 1.000 | 26073 | 25669 |
| sd(Daily individual’s experienced pressure) | 0.24 | 0.22 | [0.01, 0.90] | NA | NA | NA | NA | NA | 1.000 | 18391 | 19298 | 0.06 | 0.05 | [0.00, 0.22] | NA | NA | NA | NA | NA | 1.000 | 21497 | 20804 |
| sd(Daily partner’s experienced pressure) | 0.50 | 0.34 | [0.03, 1.37] | NA | NA | NA | NA | NA | 1.000 | 16882 | 18448 | 0.05 | 0.04 | [0.00, 0.18] | NA | NA | NA | NA | NA | 1.000 | 25375 | 23541 |
| sd(Daily individual’s experienced pushing) | 0.50 | 0.18 | [0.16, 0.94] | NA | NA | NA | NA | NA | 1.000 | 16262 | 13987 | 0.09 | 0.04 | [0.01, 0.16] | NA | NA | NA | NA | NA | 1.000 | 16713 | 14843 |
| sd(Daily partner’s experienced pushing) | 0.19 | 0.15 | [0.01, 0.55] | NA | NA | NA | NA | NA | 1.000 | 19005 | 21942 | 0.07 | 0.04 | [0.01, 0.15] | NA | NA | NA | NA | NA | 1.000 | 14492 | 12240 |
| Additional Parameters | ||||||||||||||||||||||
| sigma | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | 0.66 | 0.01 | [0.64, 0.69] | NA | NA | NA | NA | NA | 1.000 | 52425 | 30007 |
# Plot continuous part of model
variable <- c(
'(Intercept)',
'b_persuasion_self_cw',
'b_persuasion_partner_cw',
'b_pressure_self_cw',
'b_pressure_partner_cw',
'b_pushing_self_cw',
'b_pushing_partner_cw'
)
plot(
bayestestR::p_direction(pa_sub, parameter = variable),
priors = TRUE
) + theme_bw()## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
plot(
bayestestR::rope(
pa_sub,
parameter = variable,
range = rope_range_continuous,
verbose = F,
ci = 1
)
) + theme_bw()# Hurdle part of the model
variable <- c(
'b_hu_persuasion_self_cw',
'b_hu_persuasion_partner_cw',
'b_hu_pressure_self_cw',
'b_hu_pressure_partner_cw',
'b_hu_pushing_self_cw',
'b_hu_pushing_partner_cw'
)
plot(
bayestestR::p_direction(pa_sub, parameter = variable),
priors = TRUE
) + theme_bw()## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
# The rope range for the bernoulli part of the model is -0.18, 0.18
plot(
bayestestR::rope(pa_sub, parameter = variable, range = c(-0.18, 0.18), ci = 1),
verbose = FALSE
) + theme_bw()## Possible multicollinearity between b_hu_persuasion_partner_cb and
## b_hu_persuasion_self_cb (r = 0.75), b_persuasion_partner_cb and
## b_persuasion_self_cb (r = 0.76), b_pressure_partner_cb and
## b_pressure_self_cb (r = 0.83). This might lead to inappropriate results.
## See 'Details' in '?rope'.
formula <- bf(
pa_obj ~
persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw +
support_self_cw + support_partner_cw +
#isWeekend +
#got_JITAI_self +
#skilled_support +
persuasion_self_cb + persuasion_partner_cb +
pressure_self_cb + pressure_partner_cb +
pushing_self_cb + pushing_partner_cb +
support_self_cb + support_partner_cb +
#studyGroup +
plan_self + plan_partner +
day + weartime_self_cw + weartime_self_cb +
# Random effects
(persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw | coupleID)
, decomp = 'QR'
#, autocor = autocor_str
)
prior1 <- c(
brms::set_prior("normal(0, 2.5)", class = "b")
, brms::set_prior("normal(0, 50)", class = "Intercept")
, brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0)
, brms::set_prior("student_t(3, 0, 2.5)", class = "sigma", lb = 0)
)
#brms::validate_prior(
# prior1,
# formula = formula,
# data = df_double,
# family = lognormal()
# )
#df_minimal <- df_double[, c("AorB", all.vars(as.formula(formula)))]
pa_obj_log <- my_brm(
mi = use_mi,
imputed_data = implist,
formula = formula,
prior = prior1,
data = df_double,
family = lognormal(),
#control = list(adapt_delta = 0.95),
iter = iterations,
warmup = warmup,
chains = 4,
cores = 4,
seed = 7777,
file = file.path("models_cache_brms", paste0("pa_obj_log_gaussian", suffix))
)## Warning: Rows containing NAs were excluded from the model.
# rope range for lognormal model
rope_factor <- sd(log(pa_obj_log$data$pa_obj))
rope_range_log = c(-0.1 * rope_factor, 0.1 * rope_factor)
summary_pa_obj <- summarize_brms(
pa_obj_log,
stats_to_report = stats_to_report,
rope_range = rope_range_log,
model_rows_fixed = model_rows_fixed,
model_rows_random = model_rows_random,
model_rownames_fixed = model_rownames_fixed,
model_rownames_random = model_rownames_random,
exponentiate = T) ## Warning in compute_rope(range = rope_range): Collinearity detected. Some VIFs
## are > 10. This may invalidate ROPE inferences!
Low Correlation
Term VIF VIF 95% CI Increased SE Tolerance
persuasion_self_cw 1.20 [1.16, 1.25] 1.10 0.83
persuasion_partner_cw 1.21 [1.17, 1.26] 1.10 0.82 pressure_self_cw 1.08 [1.05, 1.12] 1.04 0.93 pressure_partner_cw 1.10 [1.07, 1.15] 1.05 0.91 pushing_self_cw 1.14 [1.10, 1.18] 1.07 0.88 pushing_partner_cw 1.18 [1.15, 1.23] 1.09 0.84 support_self_cw 1.20 [1.16, 1.24] 1.09 0.84 support_partner_cw 1.21 [1.17, 1.25] 1.10 0.83 pressure_self_cb 4.07 [3.86, 4.30] 2.02 0.25 pressure_partner_cb 4.50 [4.26, 4.75] 2.12 0.22 support_self_cb 2.43 [2.32, 2.56] 1.56 0.41 support_partner_cb 2.47 [2.35, 2.59] 1.57 0.41 plan_self 1.31 [1.26, 1.37] 1.14 0.76 plan_partner 1.33 [1.28, 1.38] 1.15 0.75 day 1.04 [1.02, 1.09] 1.02 0.96 weartime_self_cw 1.04 [1.02, 1.09] 1.02 0.96 weartime_self_cb 1.26 [1.22, 1.31] 1.12 0.79 Tolerance 95% CI [0.80, 0.86] [0.79, 0.85] [0.89, 0.95] [0.87, 0.93] [0.85, 0.91] [0.81, 0.87] [0.80, 0.86] [0.80, 0.86] [0.23, 0.26] [0.21, 0.23] [0.39, 0.43] [0.39, 0.43] [0.73, 0.79] [0.72, 0.78] [0.91, 0.98] [0.92, 0.98] [0.76, 0.82]
Moderate Correlation
Term VIF VIF 95% CI Increased SE Tolerance Tolerance 95% CI
persuasion_self_cb 9.52 [8.98, 10.09] 3.08 0.11 [0.10, 0.11] pushing_self_cb 7.48 [7.06, 7.92] 2.73 0.13 [0.13, 0.14] pushing_partner_cb 7.28 [6.87, 7.71] 2.70 0.14 [0.13, 0.15]
High Correlation
Term VIF VIF 95% CI Increased SE Tolerance
persuasion_partner_cb 10.36 [9.77, 10.98] 3.22 0.10 Tolerance 95% CI [0.09, 0.10]
## Sampling priors, please wait...
## Warning in summarize_brms(pa_obj_log, stats_to_report = stats_to_report, :
## Coefficients were exponentiated. Double check if this was intended.
| exp(Est.) | SE | 95% CI | pd | ROPE | inside ROPE | BF | BF_Evidence | Rhat | Bulk_ESS | Tail_ESS | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Intercept | 111.09*** | 6.06 | [99.77, 123.89] | 1.000 | [0.94, 1.07] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 8617 | 16070 |
| Within-Person Effects | |||||||||||
| Daily individual’s experienced persuasion | 1.01 | 0.02 | [ 0.98, 1.04] | 0.716 | [0.94, 1.07] | 1.000 | 0.006 | Very Strong Evidence for Null | 1.000 | 35240 | 32323 |
| Daily partner’s experienced persuasion | 1.01 | 0.02 | [ 0.97, 1.04] | 0.641 | [0.94, 1.07] | 1.000 | 0.006 | Very Strong Evidence for Null | 1.000 | 37655 | 31848 |
| Daily individual’s experienced pressure | 0.95 | 0.03 | [ 0.88, 1.01] | 0.946 | [0.94, 1.07] | 0.601 | 0.019 | Very Strong Evidence for Null | 1.000 | 56046 | 32491 |
| Daily partner’s experienced pressure | 0.98 | 0.03 | [ 0.92, 1.05] | 0.735 | [0.94, 1.07] | 0.899 | 0.006 | Very Strong Evidence for Null | 1.000 | 61327 | 31603 |
| Daily individual’s experienced pushing | 1.01 | 0.03 | [ 0.96, 1.06] | 0.617 | [0.94, 1.07] | 0.983 | 0.006 | Very Strong Evidence for Null | 1.000 | 39827 | 29964 |
| Daily partner’s experienced pushing | 1.00 | 0.02 | [ 0.96, 1.04] | 0.544 | [0.94, 1.07] | 0.996 | 0.005 | Very Strong Evidence for Null | 1.000 | 57042 | 31435 |
| Day | 0.98 | 0.04 | [ 0.91, 1.05] | 0.740 | [0.94, 1.07] | 0.870 | 0.005 | Very Strong Evidence for Null | 1.000 | 80568 | 29978 |
| Own Actionplan | 1.06* | 0.03 | [ 1.01, 1.12] | 0.991 | [0.94, 1.07] | 0.570 | 0.069 | Strong Evidence for Null | 1.000 | 83889 | 29116 |
| Partner Actionplan | 1.04 | 0.03 | [ 0.99, 1.09] | 0.916 | [0.94, 1.07] | 0.874 | 0.010 | Very Strong Evidence for Null | 1.000 | 85738 | 29099 |
| Daily weartime | 1.00*** | 0.00 | [ 1.00, 1.00] | 1.000 | [0.94, 1.07] | 1.000 | 32.057 | Very Strong Evidence | 1.000 | 86761 | 28720 |
| Daily support received | 1.04*** | 0.01 | [ 1.02, 1.06] | 1.000 | [0.94, 1.07] | 0.999 | 6.187 | Moderate Evidence | 1.000 | 87614 | 27747 |
| Daily support provided (partner’s view) | 1.01 | 0.01 | [ 0.99, 1.03] | 0.891 | [0.94, 1.07] | 1.000 | 0.009 | Very Strong Evidence for Null | 1.000 | 84356 | 27823 |
| Is a Weekend | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| JITAI received | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Days post skilled support intervention | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Between-Person Effects | |||||||||||
| Mean individual’s experienced persuasion | 1.06 | 0.15 | [ 0.79, 1.41] | 0.651 | [0.94, 1.07] | 0.322 | 0.014 | Very Strong Evidence for Null | 1.000 | 8460 | 14182 |
| Mean partner’s experienced persuasion | 0.98 | 0.14 | [ 0.73, 1.31] | 0.546 | [0.94, 1.07] | 0.345 | 0.013 | Very Strong Evidence for Null | 1.000 | 8449 | 13768 |
| Mean individual’s experienced pressure | 1.02 | 0.15 | [ 0.76, 1.38] | 0.559 | [0.94, 1.07] | 0.335 | 0.007 | Very Strong Evidence for Null | 1.000 | 11460 | 20070 |
| Mean partner’s experienced pressure | 0.96 | 0.14 | [ 0.72, 1.28] | 0.621 | [0.94, 1.07] | 0.328 | 0.009 | Very Strong Evidence for Null | 1.000 | 10221 | 17611 |
| Mean individual’s experienced pushing | 0.91 | 0.20 | [ 0.59, 1.43] | 0.660 | [0.94, 1.07] | 0.210 | 0.012 | Very Strong Evidence for Null | 1.001 | 9310 | 16336 |
| Mean partner’s experienced pushing | 1.11 | 0.24 | [ 0.72, 1.74] | 0.681 | [0.94, 1.07] | 0.205 | 0.013 | Very Strong Evidence for Null | 1.001 | 9195 | 16293 |
| Mean weartime | 1.00 | 0.00 | [ 1.00, 1.00] | 0.936 | [0.94, 1.07] | 1.000 | 0.022 | Very Strong Evidence for Null | 1.000 | 42740 | 32499 |
| Mean individual’s received support | 1.07 | 0.05 | [ 0.98, 1.16] | 0.940 | [0.94, 1.07] | 0.488 | 0.031 | Strong Evidence for Null | 1.001 | 11918 | 19532 |
| Mean partner’s received support | 1.00 | 0.04 | [ 0.92, 1.09] | 0.524 | [0.94, 1.07] | 0.868 | 0.009 | Very Strong Evidence for Null | 1.001 | 11590 | 19518 |
| Difference study group 2 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Difference study group 3 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Random Effects | |||||||||||
| sd(Intercept) | 0.30 | 0.04 | [0.23, 0.40] | NA | NA | NA | NA | NA | 1.000 | 9922 | 16679 |
| sd(Daily individual’s experienced persuasion) | 0.05 | 0.01 | [0.02, 0.08] | NA | NA | NA | NA | NA | 1.000 | 16224 | 11111 |
| sd(Daily partner’s experienced persuasion) | 0.05 | 0.02 | [0.02, 0.09] | NA | NA | NA | NA | NA | 1.000 | 19012 | 15670 |
| sd(Daily individual’s experienced pressure) | 0.04 | 0.03 | [0.00, 0.13] | NA | NA | NA | NA | NA | 1.000 | 21756 | 22864 |
| sd(Daily partner’s experienced pressure) | 0.03 | 0.03 | [0.00, 0.11] | NA | NA | NA | NA | NA | 1.000 | 27259 | 21567 |
| sd(Daily individual’s experienced pushing) | 0.07 | 0.04 | [0.01, 0.15] | NA | NA | NA | NA | NA | 1.001 | 9983 | 11153 |
| sd(Daily partner’s experienced pushing) | 0.03 | 0.03 | [0.00, 0.10] | NA | NA | NA | NA | NA | 1.000 | 15701 | 19831 |
| Additional Parameters | |||||||||||
| sigma | 0.57 | 0.01 | [0.56, 0.59] | NA | NA | NA | NA | NA | 1.000 | 71062 | 28810 |
plot(
bayestestR::p_direction(pa_obj_log),
priors = TRUE
) +
coord_cartesian(xlim = c(-3, 3)) +
theme_bw()## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
## Possible multicollinearity between b_persuasion_partner_cb and
## b_persuasion_self_cb (r = 0.88), b_pressure_self_cb and
## b_persuasion_self_cb (r = 0.72), b_pressure_partner_cb and
## b_persuasion_self_cb (r = 0.72), b_pressure_partner_cb and
## b_persuasion_partner_cb (r = 0.76), b_pushing_partner_cb and
## b_pushing_self_cb (r = 0.84). This might lead to inappropriate results.
## See 'Details' in '?rope'.
formula <- bf(
aff ~
persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw +
support_self_cw + support_partner_cw +
#isWeekend +
#got_JITAI_self +
#skilled_support +
persuasion_self_cb + persuasion_partner_cb +
pressure_self_cb + pressure_partner_cb +
pushing_self_cb + pushing_partner_cb +
support_self_cb + support_partner_cb +
#studyGroup +
plan_self + plan_partner +
day +
# Random effects
(persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw | coupleID)
, decomp = 'QR'
#, autocor = autocor_str
)
prior1 <- c(
brms::set_prior("normal(0, 5)", class = "b")
,brms::set_prior("normal(0, 20)", class = "Intercept", lb=1, ub=6)
, brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0)
, brms::set_prior("student_t(3, 0, 2.5)", class = "sigma", lb = 0)
)
#brms::validate_prior(
# prior1,
# formula = formula,
# data = df_double,
# family = gaussian()
# )
#df_minimal <- df_double[, c("AorB", all.vars(as.formula(formula)))]
mood_gauss <- my_brm(
mi = use_mi,
imputed_data = implist,
formula = formula,
prior = prior1,
data = df_double,
family = gaussian(),
#control = list(adapt_delta = 0.95, max_treedepth = 15),
iter = iterations,
warmup = warmup,
chains = 4,
cores = 4,
seed = 7777,
file = file.path("models_cache_brms", paste0("mood_gauss", suffix))
)## Warning: Rows containing NAs were excluded from the model.
summary_mood <- summarize_brms(
mood_gauss,
stats_to_report = stats_to_report,
model_rows_fixed = model_rows_fixed,
model_rows_random = model_rows_random,
model_rownames_fixed = model_rownames_fixed,
model_rownames_random = model_rownames_random,
exponentiate = F) ## Warning in compute_rope(range = rope_range): Collinearity detected. Some VIFs
## are > 10. This may invalidate ROPE inferences!
Low Correlation
Term VIF VIF 95% CI Increased SE Tolerance
persuasion_self_cw 1.26 [ 1.22, 1.31] 1.12 0.80
persuasion_partner_cw 1.19 [ 1.16, 1.24] 1.09 0.84 pressure_self_cw 1.08 [ 1.05, 1.13] 1.04 0.92 pressure_partner_cw 1.08 [ 1.05, 1.12] 1.04 0.93 pushing_self_cw 1.17 [ 1.14, 1.22] 1.08 0.85 pushing_partner_cw 1.17 [ 1.14, 1.22] 1.08 0.85 support_self_cw 1.24 [ 1.20, 1.29] 1.11 0.81 support_partner_cw 1.21 [ 1.17, 1.25] 1.10 0.83 support_self_cb 3.10 [ 2.96, 3.26] 1.76 0.32 support_partner_cb 3.11 [ 2.96, 3.27] 1.76 0.32 plan_self 1.30 [ 1.26, 1.35] 1.14 0.77 plan_partner 1.30 [ 1.26, 1.35] 1.14 0.77 day 1.05 [ 1.03, 1.10] 1.02 0.95 Tolerance 95% CI [0.77, 0.82] [0.81, 0.86] [0.89, 0.95] [0.89, 0.95] [0.82, 0.88] [0.82, 0.88] [0.78, 0.83] [0.80, 0.86] [0.31, 0.34] [0.31, 0.34] [0.74, 0.79] [0.74, 0.80] [0.91, 0.97]
Moderate Correlation
Term VIF VIF 95% CI Increased SE Tolerance
pressure_self_cb 6.04 [ 5.73, 6.38] 2.46 0.17
pressure_partner_cb 5.94 [ 5.63, 6.27] 2.44 0.17 Tolerance 95% CI [0.16, 0.17] [0.16, 0.18]
High Correlation
Term VIF VIF 95% CI Increased SE Tolerance
persuasion_self_cb 15.96 [15.08, 16.91] 4.00 0.06
persuasion_partner_cb 15.88 [15.00, 16.81] 3.98 0.06 pushing_self_cb 10.71 [10.13, 11.33] 3.27 0.09 pushing_partner_cb 10.62 [10.04, 11.24] 3.26 0.09 Tolerance 95% CI [0.06, 0.07] [0.06, 0.07] [0.09, 0.10] [0.09, 0.10]
## Sampling priors, please wait...
| Est. | SE | 95% CI | pd | ROPE | inside ROPE | BF | BF_Evidence | Rhat | Bulk_ESS | Tail_ESS | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Intercept | 3.68*** | 0.11 | [ 3.47, 3.89] | 1.000 | [-0.11, 0.11] | 0.000 | >100 | Overwhelming Evidence | 1.001 | 4636 | 10416 |
| Within-Person Effects | |||||||||||
| Daily individual’s experienced persuasion | -0.04 | 0.02 | [-0.08, 0.00] | 0.968 | [-0.11, 0.11] | 1.000 | 0.022 | Very Strong Evidence for Null | 1.000 | 42663 | 31018 |
| Daily partner’s experienced persuasion | -0.01 | 0.02 | [-0.05, 0.04] | 0.604 | [-0.11, 0.11] | 1.000 | 0.004 | Very Strong Evidence for Null | 1.000 | 32020 | 28817 |
| Daily individual’s experienced pressure | -0.03 | 0.05 | [-0.14, 0.08] | 0.690 | [-0.11, 0.11] | 0.941 | 0.004 | Very Strong Evidence for Null | 1.000 | 40994 | 28511 |
| Daily partner’s experienced pressure | -0.01 | 0.05 | [-0.12, 0.10] | 0.551 | [-0.11, 0.11] | 0.956 | 0.004 | Very Strong Evidence for Null | 1.000 | 36900 | 27571 |
| Daily individual’s experienced pushing | -0.01 | 0.03 | [-0.08, 0.05] | 0.664 | [-0.11, 0.11] | 0.998 | 0.004 | Very Strong Evidence for Null | 1.000 | 45463 | 30598 |
| Daily partner’s experienced pushing | 0.06 | 0.03 | [-0.01, 0.13] | 0.960 | [-0.11, 0.11] | 0.942 | 0.020 | Very Strong Evidence for Null | 1.000 | 34033 | 28884 |
| Day | 0.26*** | 0.06 | [ 0.15, 0.37] | 1.000 | [-0.11, 0.11] | 0.004 | 54.061 | Very Strong Evidence | 1.000 | 61553 | 29547 |
| Own Actionplan | 0.10* | 0.04 | [ 0.02, 0.17] | 0.993 | [-0.11, 0.11] | 0.675 | 0.071 | Strong Evidence for Null | 1.000 | 68477 | 29892 |
| Partner Actionplan | -0.06 | 0.04 | [-0.14, 0.01] | 0.945 | [-0.11, 0.11] | 0.906 | 0.012 | Very Strong Evidence for Null | 1.000 | 61059 | 29176 |
| Daily weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Daily support received | 0.08*** | 0.01 | [ 0.05, 0.11] | 1.000 | [-0.11, 0.11] | 0.981 | >100 | Overwhelming Evidence | 1.000 | 59790 | 30069 |
| Daily support provided (partner’s view) | 0.04* | 0.01 | [ 0.01, 0.07] | 0.992 | [-0.11, 0.11] | 1.000 | 0.065 | Strong Evidence for Null | 1.000 | 66941 | 31673 |
| Is a Weekend | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| JITAI received | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Days post skilled support intervention | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Between-Person Effects | |||||||||||
| Mean individual’s experienced persuasion | 0.26 | 0.29 | [-0.33, 0.84] | 0.809 | [-0.11, 0.11] | 0.210 | 0.020 | Very Strong Evidence for Null | 1.001 | 5263 | 10008 |
| Mean partner’s experienced persuasion | 0.31 | 0.29 | [-0.26, 0.90] | 0.856 | [-0.11, 0.11] | 0.175 | 0.023 | Very Strong Evidence for Null | 1.000 | 5111 | 9557 |
| Mean individual’s experienced pressure | -0.26 | 0.28 | [-0.83, 0.30] | 0.823 | [-0.11, 0.11] | 0.208 | 0.013 | Very Strong Evidence for Null | 1.000 | 5994 | 11902 |
| Mean partner’s experienced pressure | -0.35 | 0.28 | [-0.92, 0.22] | 0.889 | [-0.11, 0.11] | 0.152 | 0.018 | Very Strong Evidence for Null | 1.000 | 5912 | 11295 |
| Mean individual’s experienced pushing | 0.20 | 0.42 | [-0.65, 1.04] | 0.683 | [-0.11, 0.11] | 0.190 | 0.013 | Very Strong Evidence for Null | 1.000 | 6104 | 11832 |
| Mean partner’s experienced pushing | 0.16 | 0.42 | [-0.69, 0.99] | 0.645 | [-0.11, 0.11] | 0.198 | 0.012 | Very Strong Evidence for Null | 1.000 | 5927 | 11248 |
| Mean weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Mean individual’s received support | 0.15 | 0.08 | [ 0.00, 0.31] | 0.972 | [-0.11, 0.11] | 0.323 | 0.055 | Strong Evidence for Null | 1.000 | 9312 | 15746 |
| Mean partner’s received support | -0.09 | 0.08 | [-0.24, 0.07] | 0.868 | [-0.11, 0.11] | 0.635 | 0.016 | Very Strong Evidence for Null | 1.000 | 8905 | 14505 |
| Difference study group 2 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Difference study group 3 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Random Effects | |||||||||||
| sd(Intercept) | 0.61 | 0.08 | [0.48, 0.80] | NA | NA | NA | NA | NA | 1.000 | 7898 | 15242 |
| sd(Daily individual’s experienced persuasion) | 0.04 | 0.03 | [0.00, 0.10] | NA | NA | NA | NA | NA | 1.000 | 10400 | 12148 |
| sd(Daily partner’s experienced persuasion) | 0.07 | 0.03 | [0.01, 0.12] | NA | NA | NA | NA | NA | 1.000 | 10790 | 10204 |
| sd(Daily individual’s experienced pressure) | 0.07 | 0.06 | [0.00, 0.26] | NA | NA | NA | NA | NA | 1.000 | 15443 | 17966 |
| sd(Daily partner’s experienced pressure) | 0.07 | 0.06 | [0.00, 0.26] | NA | NA | NA | NA | NA | 1.000 | 14871 | 16456 |
| sd(Daily individual’s experienced pushing) | 0.05 | 0.04 | [0.00, 0.14] | NA | NA | NA | NA | NA | 1.000 | 14276 | 16357 |
| sd(Daily partner’s experienced pushing) | 0.06 | 0.04 | [0.00, 0.16] | NA | NA | NA | NA | NA | 1.000 | 14437 | 16460 |
| Additional Parameters | |||||||||||
| sigma | 0.95 | 0.01 | [0.93, 0.97] | NA | NA | NA | NA | NA | 1.000 | 58458 | 30287 |
plot(
bayestestR::p_direction(mood_gauss),
priors = TRUE
) +
coord_cartesian(xlim = c(-3, 3)) +
theme_bw()## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
## Possible multicollinearity between b_pressure_self_cb and
## b_persuasion_self_cb (r = 0.81), b_pressure_partner_cb and
## b_persuasion_self_cb (r = 0.79), b_pressure_self_cb and
## b_persuasion_partner_cb (r = 0.78), b_pressure_partner_cb and
## b_persuasion_partner_cb (r = 0.81), b_pressure_partner_cb and
## b_pressure_self_cb (r = 0.77), b_support_partner_cb and
## b_support_self_cb (r = 0.77). This might lead to inappropriate results.
## See 'Details' in '?rope'.
conditional_spaghetti(
mood_gauss,
effects = c('pushing_partner_cw'),
group_var = 'coupleID',
plot_full_range = TRUE
)$pushing_partner_cw
df_double$reactance_ordinal <- factor(df_double$reactance,
levels = 0:5,
ordered = TRUE)
formula <- bf(
reactance_ordinal ~
persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw +
support_self_cw + support_partner_cw +
#isWeekend +
#got_JITAI_self +
#skilled_support +
persuasion_self_cb + persuasion_partner_cb +
pressure_self_cb + pressure_partner_cb +
pushing_self_cb + pushing_partner_cb +
support_self_cb + support_partner_cb +
#studyGroup +
plan_self + plan_partner +
day +
# Random effects
(persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw | coupleID)
, decomp = 'QR'
#, autocor = autocor_str
)
prior1 <- c(
brms::set_prior("normal(0, 2.5)", class = "b")
, brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0)
)
#brms::validate_prior(
# prior1,
# formula = formula,
# data = df_double,
# family = cumulative() # HURDLE_CUMULATIVE
# )
#df_minimal <- df_double[, c("AorB", all.vars(as.formula(formula)))]
reactance_ordinal <- my_brm(
mi = use_mi,
imputed_data = implist,
formula = formula,
prior = prior1,
data = df_double,
family = brms::cumulative(),
#control = list(adapt_delta = 0.95),
iter = iterations,
warmup = warmup,
chains = 4,
cores = 4,
seed = 7777
, file = file.path("models_cache_brms", paste0("reactance_ordinal", suffix))
)## Warning: Rows containing NAs were excluded from the model.
summary_reactance_ordinal <- summarize_brms(
reactance_ordinal,
stats_to_report = stats_to_report,
rope_range = c(-0.18, 0.18),
model_rows_fixed = model_rows_fixed_ordinal,
model_rows_random = model_rows_random_ordinal,
model_rownames_fixed = model_rownames_fixed_ordinal,
model_rownames_random = model_rownames_random_ordinal,
exponentiate = T) ## Warning in compute_rope(range = rope_range): Collinearity detected. Some VIFs
## are > 10. This may invalidate ROPE inferences!
Low Correlation
Term VIF VIF 95% CI Increased SE Tolerance
pressure_self_cw 4.71 [ 4.38, 5.07] 2.17 0.21
pressure_partner_cw 1.55 [ 1.47, 1.64] 1.24 0.65 pushing_self_cw 1.44 [ 1.37, 1.52] 1.20 0.69 pushing_partner_cw 1.26 [ 1.21, 1.33] 1.12 0.79 support_self_cw 1.10 [ 1.06, 1.16] 1.05 0.91 support_partner_cw 1.08 [ 1.05, 1.15] 1.04 0.93 persuasion_self_cb 1.41 [ 1.34, 1.49] 1.19 0.71 persuasion_partner_cb 1.22 [ 1.17, 1.29] 1.10 0.82 pressure_self_cb 1.19 [ 1.14, 1.26] 1.09 0.84 pressure_partner_cb 1.21 [ 1.16, 1.27] 1.10 0.83 plan_self 2.50 [ 2.35, 2.68] 1.58 0.40 plan_partner 2.71 [ 2.54, 2.90] 1.65 0.37 day 2.16 [ 2.04, 2.31] 1.47 0.46 Tolerance 95% CI [0.20, 0.23] [0.61, 0.68] [0.66, 0.73] [0.75, 0.83] [0.86, 0.94] [0.87, 0.96] [0.67, 0.75] [0.78, 0.86] [0.79, 0.87] [0.79, 0.87] [0.37, 0.43] [0.35, 0.39] [0.43, 0.49]
Moderate Correlation
Term VIF VIF 95% CI Increased SE Tolerance Tolerance 95% CI
persuasion_self_cw 9.24 [ 8.56, 9.99] 3.04 0.11 [0.10, 0.12] pushing_self_cb 6.18 [ 5.74, 6.67] 2.49 0.16 [0.15, 0.17] pushing_partner_cb 8.03 [ 7.44, 8.67] 2.83 0.12 [0.12, 0.13] support_self_cb 5.73 [ 5.32, 6.18] 2.39 0.17 [0.16, 0.19] support_partner_cb 6.44 [ 5.97, 6.95] 2.54 0.16 [0.14, 0.17]
High Correlation
Term VIF VIF 95% CI Increased SE Tolerance
persuasion_partner_cw 10.86 [10.05, 11.74] 3.30 0.09 Tolerance 95% CI [0.09, 0.10]
## Sampling priors, please wait...
| OR | SE | 95% CI | pd | ROPE | inside ROPE | BF | BF_Evidence | Rhat | Bulk_ESS | Tail_ESS | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Intercepts | |||||||||||
| Intercept | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Intercept[1] | 3.38*** | 1.07 | [ 1.87, 6.46] | 1.000 | [0.84, 1.20] | 0.000 | 86.372 | Very Strong Evidence | 1.000 | 28157 | 30059 |
| Intercept[2] | 7.54*** | 2.46 | [ 4.06, 14.72] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 27876 | 30217 |
| Intercept[3] | 20.27*** | 7.05 | [ 10.55, 41.34] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 27842 | 29101 |
| Intercept[4] | 88.31*** | 35.46 | [ 41.49, 198.39] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 29212 | 29638 |
| Intercept[5] | 2764.71*** | 1844.86 | [802.49, 11649.75] | 1.000 | [0.84, 1.20] | 0.000 | >100 | Overwhelming Evidence | 1.000 | 38986 | 31310 |
| Within-Person Effects | |||||||||||
| Daily individual’s experienced persuasion | 0.92 | 0.08 | [ 0.76, 1.10] | 0.834 | [0.84, 1.20] | 0.845 | 0.072 | Strong Evidence for Null | 1.000 | 33453 | 28493 |
| Daily partner’s experienced persuasion | 1.12 | 0.12 | [ 0.89, 1.39] | 0.841 | [0.84, 1.20] | 0.737 | 0.077 | Strong Evidence for Null | 1.000 | 29129 | 28447 |
| Daily individual’s experienced pressure | 1.84* | 0.35 | [ 1.17, 2.65] | 0.992 | [0.84, 1.20] | 0.029 | 2.063 | Weak Evidence | 1.000 | 17867 | 19045 |
| Daily partner’s experienced pressure | 1.17 | 0.29 | [ 0.65, 1.98] | 0.730 | [0.84, 1.20] | 0.439 | 0.066 | Strong Evidence for Null | 1.000 | 18651 | 17780 |
| Daily individual’s experienced pushing | 1.26* | 0.14 | [ 1.00, 1.59] | 0.975 | [0.84, 1.20] | 0.332 | 0.345 | Weak Evidence for Null | 1.000 | 26629 | 27210 |
| Daily partner’s experienced pushing | 0.95 | 0.13 | [ 0.72, 1.24] | 0.650 | [0.84, 1.20] | 0.787 | 0.049 | Strong Evidence for Null | 1.000 | 26486 | 24359 |
| Day | 1.51 | 0.55 | [ 0.74, 3.08] | 0.872 | [0.84, 1.20] | 0.212 | 0.073 | Strong Evidence for Null | 1.000 | 35743 | 30701 |
| Own Actionplan | 0.88 | 0.26 | [ 0.49, 1.57] | 0.673 | [0.84, 1.20] | 0.420 | 0.044 | Strong Evidence for Null | 1.000 | 43169 | 29459 |
| Partner Actionplan | 0.98 | 0.25 | [ 0.59, 1.64] | 0.533 | [0.84, 1.20] | 0.509 | 0.038 | Strong Evidence for Null | 1.000 | 43559 | 30891 |
| Daily weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Daily support received | 0.82** | 0.06 | [ 0.71, 0.95] | 0.997 | [0.84, 1.20] | 0.404 | 1.481 | Weak Evidence | 1.000 | 47759 | 30811 |
| Daily support provided (partner’s view) | 0.87 | 0.07 | [ 0.75, 1.01] | 0.964 | [0.84, 1.20] | 0.725 | 0.202 | Moderate Evidence for Null | 1.000 | 44730 | 30082 |
| Is a Weekend | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| JITAI received | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Days post skilled support intervention | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Between-Person Effects | |||||||||||
| Mean individual’s experienced persuasion | 1.20 | 0.67 | [ 0.39, 3.78] | 0.630 | [0.84, 1.20] | 0.242 | 0.061 | Strong Evidence for Null | 1.000 | 18151 | 24504 |
| Mean partner’s experienced persuasion | 1.43 | 0.93 | [ 0.40, 5.55] | 0.710 | [0.84, 1.20] | 0.191 | 0.064 | Strong Evidence for Null | 1.000 | 19242 | 24092 |
| Mean individual’s experienced pressure | 3.74* | 2.20 | [ 1.17, 12.65] | 0.987 | [0.84, 1.20] | 0.021 | 0.645 | Weak Evidence for Null | 1.000 | 16721 | 25725 |
| Mean partner’s experienced pressure | 1.37 | 0.86 | [ 0.38, 4.62] | 0.692 | [0.84, 1.20] | 0.196 | 0.059 | Strong Evidence for Null | 1.000 | 16907 | 23793 |
| Mean individual’s experienced pushing | 1.66 | 1.42 | [ 0.30, 9.89] | 0.723 | [0.84, 1.20] | 0.139 | 0.067 | Strong Evidence for Null | 1.000 | 14484 | 21747 |
| Mean partner’s experienced pushing | 0.11* | 0.12 | [ 0.01, 0.89] | 0.981 | [0.84, 1.20] | 0.016 | 0.531 | Weak Evidence for Null | 1.000 | 17810 | 25137 |
| Mean weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Mean individual’s received support | 0.66 | 0.20 | [ 0.36, 1.19] | 0.915 | [0.84, 1.20] | 0.199 | 0.136 | Moderate Evidence for Null | 1.000 | 35868 | 31091 |
| Mean partner’s received support | 0.91 | 0.21 | [ 0.57, 1.41] | 0.663 | [0.84, 1.20] | 0.529 | 0.054 | Strong Evidence for Null | 1.000 | 26836 | 28221 |
| Difference study group 2 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Difference study group 3 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Random Effects | |||||||||||
| sd(Intercept) | 0.83 | 0.21 | [0.47, 1.34] | NA | NA | NA | NA | NA | 1.000 | 11518 | 21391 |
| sd(Daily individual’s experienced persuasion) | 0.21 | 0.13 | [0.01, 0.48] | NA | NA | NA | NA | NA | 1.001 | 6306 | 10506 |
| sd(Daily partner’s experienced persuasion) | 0.23 | 0.15 | [0.02, 0.56] | NA | NA | NA | NA | NA | 1.000 | 9078 | 10298 |
| sd(Daily individual’s experienced pressure) | 0.50 | 0.27 | [0.05, 1.12] | NA | NA | NA | NA | NA | 1.000 | 7762 | 8673 |
| sd(Daily partner’s experienced pressure) | 0.41 | 0.38 | [0.02, 1.53] | NA | NA | NA | NA | NA | 1.000 | 9212 | 15883 |
| sd(Daily individual’s experienced pushing) | 0.24 | 0.14 | [0.02, 0.56] | NA | NA | NA | NA | NA | 1.000 | 9893 | 11564 |
| sd(Daily partner’s experienced pushing) | 0.14 | 0.13 | [0.01, 0.61] | NA | NA | NA | NA | NA | 1.000 | 13475 | 16244 |
| Additional Parameters | |||||||||||
| sigma | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| disc | 1.00 | 0.00 | [1.00, 1.00] | NA | NA | NA | NA | NA | NA | NA | NA |
plot(
bayestestR::p_direction(reactance_ordinal),
priors = TRUE
) +
coord_cartesian(xlim = c(-6, 6)) +
theme_bw()## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
## Possible multicollinearity between b_Intercept[4] and b_Intercept[2] (r
## = 0.81), b_Intercept[4] and b_Intercept[3] (r = 0.87),
## b_pressure_partner_cb and b_persuasion_partner_cb (r = 0.79). This might
## lead to inappropriate results. See 'Details' in '?rope'.
introduce_binary_reactance <- function(data) {
data$is_reactance <- factor(data$reactance > 0, levels = c(FALSE, TRUE), labels = c(0, 1))
return(data)
}
df_double <- introduce_binary_reactance(df_double)
if (use_mi) {
for (i in seq_along(implist)) {
implist[[i]] <- introduce_binary_reactance(implist[[i]])
}
}
formula <- bf(
is_reactance ~
persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw +
support_self_cw + support_partner_cw +
#isWeekend +
#got_JITAI_self +
#skilled_support +
persuasion_self_cb + persuasion_partner_cb +
pressure_self_cb + pressure_partner_cb +
pushing_self_cb + pushing_partner_cb +
support_self_cb + support_partner_cb +
#studyGroup +
plan_self + plan_partner +
day +
# Random effects
(persuasion_self_cw + persuasion_partner_cw +
pressure_self_cw + pressure_partner_cw +
pushing_self_cw + pushing_partner_cw | coupleID)
, decomp = 'QR'
#, autocor = autocor_str
)
prior1 <- c(
brms::set_prior("normal(0, 2.5)", class = "b")
, brms::set_prior("normal(0, 10)", class = "Intercept", lb=0, ub=5)
, brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0)
)
#brms::validate_prior(
# prior1,
# formula = formula,
# data = df_double,
# family = bernoulli()
# )
#df_minimal <- df_double[, c("AorB", all.vars(as.formula(formula)))]
is_reactance <- my_brm(
mi = use_mi,
imputed_data = implist,
formula = formula,
prior = prior1,
data = df_double,
family = brms::bernoulli(),
#control = list(adapt_delta = 0.95, max_treedepth = 15),
iter = iterations,
warmup = warmup,
chains = 4,
cores = 4,
seed = 7777,
file = file.path("models_cache_brms", paste0("is_reactance", suffix))
#, file_refit = 'always'
)## Warning: Rows containing NAs were excluded from the model.
summary_is_reactance <- summarize_brms(
is_reactance,
stats_to_report = stats_to_report,
model_rows_fixed = model_rows_fixed,
model_rows_random = model_rows_random,
model_rownames_fixed = model_rownames_fixed,
model_rownames_random = model_rownames_random,
exponentiate = T) ## Sampling priors, please wait...
| OR | SE | 95% CI | pd | ROPE | inside ROPE | BF | BF_Evidence | Rhat | Bulk_ESS | Tail_ESS | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Intercept | 0.37** | 0.13 | [0.19, 0.73] | 0.998 | [0.83, 1.20] | 0.009 | 3.322 | Moderate Evidence | 1.000 | 28882 | 31592 |
| Within-Person Effects | |||||||||||
| Daily individual’s experienced persuasion | 0.90 | 0.10 | [0.72, 1.12] | 0.827 | [0.83, 1.20] | 0.760 | 0.087 | Strong Evidence for Null | 1.000 | 30072 | 29694 |
| Daily partner’s experienced persuasion | 1.22 | 0.20 | [0.89, 1.76] | 0.897 | [0.83, 1.20] | 0.437 | 0.152 | Moderate Evidence for Null | 1.000 | 18121 | 21598 |
| Daily individual’s experienced pressure | 2.01* | 0.64 | [1.05, 4.72] | 0.981 | [0.83, 1.20] | 0.048 | 1.108 | Weak Evidence | 1.000 | 14465 | 12728 |
| Daily partner’s experienced pressure | 1.35 | 0.63 | [0.49, 4.63] | 0.748 | [0.83, 1.20] | 0.248 | 0.126 | Moderate Evidence for Null | 1.000 | 16284 | 15750 |
| Daily individual’s experienced pushing | 1.40* | 0.19 | [1.07, 1.88] | 0.992 | [0.83, 1.20] | 0.132 | 1.091 | Weak Evidence | 1.000 | 27579 | 27290 |
| Daily partner’s experienced pushing | 0.93 | 0.19 | [0.60, 1.42] | 0.648 | [0.83, 1.20] | 0.583 | 0.076 | Strong Evidence for Null | 1.000 | 26674 | 22280 |
| Day | 1.57 | 0.66 | [0.70, 3.56] | 0.861 | [0.83, 1.20] | 0.193 | 0.082 | Strong Evidence for Null | 1.000 | 39189 | 28916 |
| Own Actionplan | 0.92 | 0.31 | [0.47, 1.76] | 0.603 | [0.83, 1.20] | 0.400 | 0.046 | Strong Evidence for Null | 1.000 | 40610 | 26381 |
| Partner Actionplan | 0.92 | 0.28 | [0.51, 1.68] | 0.599 | [0.83, 1.20] | 0.432 | 0.047 | Strong Evidence for Null | 1.000 | 42374 | 25772 |
| Daily weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Daily support received | 0.83* | 0.07 | [0.70, 0.98] | 0.986 | [0.83, 1.20] | 0.464 | 0.549 | Weak Evidence for Null | 1.000 | 41660 | 29659 |
| Daily support provided (partner’s view) | 0.88 | 0.08 | [0.74, 1.04] | 0.932 | [0.83, 1.20] | 0.724 | 0.139 | Moderate Evidence for Null | 1.000 | 46475 | 29599 |
| Is a Weekend | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| JITAI received | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Days post skilled support intervention | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Between-Person Effects | |||||||||||
| Mean individual’s experienced persuasion | 2.14 | 1.54 | [0.51, 9.54] | 0.858 | [0.83, 1.20] | 0.115 | 0.136 | Moderate Evidence for Null | 1.000 | 16755 | 24065 |
| Mean partner’s experienced persuasion | 2.35 | 1.96 | [0.48, 13.45] | 0.853 | [0.83, 1.20] | 0.106 | 0.119 | Moderate Evidence for Null | 1.000 | 17586 | 25094 |
| Mean individual’s experienced pressure | 37.03** | 50.64 | [3.10, 706.32] | 0.998 | [0.83, 1.20] | 0.002 | 7.543 | Moderate Evidence | 1.000 | 12105 | 19063 |
| Mean partner’s experienced pressure | 1.80 | 2.63 | [0.09, 26.68] | 0.655 | [0.83, 1.20] | 0.089 | 0.135 | Moderate Evidence for Null | 1.000 | 11929 | 20165 |
| Mean individual’s experienced pushing | 0.91 | 1.15 | [0.07, 10.72] | 0.531 | [0.83, 1.20] | 0.112 | 0.082 | Strong Evidence for Null | 1.001 | 13053 | 21663 |
| Mean partner’s experienced pushing | 0.07* | 0.10 | [0.00, 0.98] | 0.976 | [0.83, 1.20] | 0.016 | 0.540 | Weak Evidence for Null | 1.001 | 13101 | 20100 |
| Mean weartime | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Mean individual’s received support | 0.73 | 0.26 | [0.36, 1.49] | 0.808 | [0.83, 1.20] | 0.274 | 0.093 | Strong Evidence for Null | 1.000 | 28615 | 28645 |
| Mean partner’s received support | 0.80 | 0.22 | [0.45, 1.36] | 0.792 | [0.83, 1.20] | 0.368 | 0.081 | Strong Evidence for Null | 1.000 | 19749 | 25276 |
| Difference study group 2 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Difference study group 3 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Random Effects | |||||||||||
| sd(Intercept) | 1.28 | 0.28 | [0.82, 1.96] | NA | NA | NA | NA | NA | 1.000 | 10942 | 20309 |
| sd(Daily individual’s experienced persuasion) | 0.28 | 0.16 | [0.02, 0.60] | NA | NA | NA | NA | NA | 1.001 | 6025 | 8356 |
| sd(Daily partner’s experienced persuasion) | 0.55 | 0.23 | [0.15, 1.11] | NA | NA | NA | NA | NA | 1.001 | 8368 | 6490 |
| sd(Daily individual’s experienced pressure) | 1.02 | 0.58 | [0.09, 2.41] | NA | NA | NA | NA | NA | 1.001 | 6084 | 7182 |
| sd(Daily partner’s experienced pressure) | 0.88 | 0.73 | [0.04, 2.96] | NA | NA | NA | NA | NA | 1.001 | 8942 | 14104 |
| sd(Daily individual’s experienced pushing) | 0.27 | 0.18 | [0.02, 0.68] | NA | NA | NA | NA | NA | 1.000 | 11167 | 13618 |
| sd(Daily partner’s experienced pushing) | 0.29 | 0.26 | [0.01, 1.09] | NA | NA | NA | NA | NA | 1.000 | 11716 | 14986 |
| Additional Parameters | |||||||||||
| sigma | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
plot(
bayestestR::p_direction(is_reactance),
priors = TRUE
) +
coord_cartesian(xlim = c(-6, 6)) +
theme_bw()## Warning in `==.default`(dens$Parameter, parameter): longer object length is not
## a multiple of shorter object length
## Warning in is.na(e1) | is.na(e2): longer object length is not a multiple of
## shorter object length
conditional_spaghetti(
is_reactance,
effects = c('pressure_self_cw', 'pushing_self_cw'),
group_var = 'coupleID',
plot_full_range = TRUE
)\(pressure_self_cw
<img
src="04_SensitivityExchangeProcessesCovariates_files/figure-html/report_is_reactance-3.png"
width="2400" />\)pushing_self_cw
summary_all_models <- report_side_by_side(
pa_sub,
pa_obj_log,
mood_gauss,
is_reactance,
stats_to_report = c('CI'),
model_rows_random = model_rows_random,
model_rows_fixed = model_rows_fixed,
model_rownames_random = model_rownames_random,
model_rownames_fixed = model_rownames_fixed
)[1] “pa_sub”
## Warning in summarize_brms(model, exponentiate = exponentiate, stats_to_report =
## stats_to_report, : Coefficients were exponentiated. Double check if this was
## intended.
[1] “pa_obj_log”
## Warning in summarize_brms(model, exponentiate = exponentiate, stats_to_report =
## stats_to_report, : Coefficients were exponentiated. Double check if this was
## intended.
[1] “mood_gauss” [1] “is_reactance”
summary_all_models <- summary_all_models %>%
print_df(rows_to_pack = rows_to_pack) %>%
add_header_above(
c(
" ", "Hurdle Component" = 2, "Non-Zero Component" = 2,
" " = 6
)
) %>%
add_header_above(
c(" ", "Subjective MVPA Hurdle Lognormal" = 4,
"Device-Based MVPA Log (Gaussian)" = 2,
"Mood Gaussian" = 2,
#"Reactance Ordinal" = 2,
"Reactance Dichotome" = 2
)
)
export_xlsx(
summary_all_models,
rows_to_pack = rows_to_pack,
file.path("Output", paste0("AllModels", suffix, ".xlsx")),
merge_option = 'both',
simplify_2nd_row = TRUE,
line_above_rows = c(1,2),
line_below_rows = c(-1)
)##
## Attaching package: 'rvest'
## The following object is masked from 'package:readr':
##
## guess_encoding
| exp(Est.)_hu pa_sub | 95% CI_hu pa_sub | exp(Est.)_nonzero pa_sub | 95% CI_nonzero pa_sub | exp(Est.) pa_obj_log | 95% CI pa_obj_log | Est. mood_gauss | 95% CI mood_gauss | OR is_reactance | 95% CI is_reactance | |
|---|---|---|---|---|---|---|---|---|---|---|
| Intercept | 0.23*** | [ 0.16, 0.33] | 33.94*** | [28.67, 40.15] | 111.09*** | [99.77, 123.89] | 3.68*** | [ 3.47, 3.89] | 0.37** | [0.19, 0.73] |
| Within-Person Effects | ||||||||||
| Daily individual’s experienced persuasion | 1.20** | [ 1.04, 1.40] | 0.99 | [ 0.94, 1.05] | 1.01 | [ 0.98, 1.04] | -0.04 | [-0.08, 0.00] | 0.90 | [0.72, 1.12] |
| Daily partner’s experienced persuasion | 1.09 | [ 0.95, 1.26] | 1.00 | [ 0.96, 1.05] | 1.01 | [ 0.97, 1.04] | -0.01 | [-0.05, 0.04] | 1.22 | [0.89, 1.76] |
| Daily individual’s experienced pressure | 0.93 | [ 0.65, 1.35] | 0.91 | [ 0.82, 1.01] | 0.95 | [ 0.88, 1.01] | -0.03 | [-0.14, 0.08] | 2.01* | [1.05, 4.72] |
| Daily partner’s experienced pressure | 1.68* | [ 1.07, 3.13] | 0.95 | [ 0.87, 1.04] | 0.98 | [ 0.92, 1.05] | -0.01 | [-0.12, 0.10] | 1.35 | [0.49, 4.63] |
| Daily individual’s experienced pushing | 0.88 | [ 0.66, 1.20] | 0.97 | [ 0.91, 1.03] | 1.01 | [ 0.96, 1.06] | -0.01 | [-0.08, 0.05] | 1.40* | [1.07, 1.88] |
| Daily partner’s experienced pushing | 1.21 | [ 0.97, 1.58] | 0.95 | [ 0.89, 1.01] | 1.00 | [ 0.96, 1.04] | 0.06 | [-0.01, 0.13] | 0.93 | [0.60, 1.42] |
| Day | 0.87 | [ 0.64, 1.20] | 0.99 | [ 0.88, 1.12] | 0.98 | [ 0.91, 1.05] | 0.26*** | [ 0.15, 0.37] | 1.57 | [0.70, 3.56] |
| Own Actionplan | 10.93*** | [ 8.83, 13.57] | 1.37*** | [ 1.24, 1.50] | 1.06* | [ 1.01, 1.12] | 0.10* | [ 0.02, 0.17] | 0.92 | [0.47, 1.76] |
| Partner Actionplan | 1.02 | [ 0.83, 1.25] | 1.03 | [ 0.95, 1.13] | 1.04 | [ 0.99, 1.09] | -0.06 | [-0.14, 0.01] | 0.92 | [0.51, 1.68] |
| Daily weartime | NA | NA | NA | NA | 1.00*** | [ 1.00, 1.00] | NA | NA | NA | NA |
| Daily support received | 1.72*** | [ 1.57, 1.90] | 1.07*** | [ 1.05, 1.10] | 1.04*** | [ 1.02, 1.06] | 0.08*** | [ 0.05, 0.11] | 0.83* | [0.70, 0.98] |
| Daily support provided (partner’s view) | 1.39*** | [ 1.28, 1.52] | 1.05*** | [ 1.02, 1.08] | 1.01 | [ 0.99, 1.03] | 0.04* | [ 0.01, 0.07] | 0.88 | [0.74, 1.04] |
| Is a Weekend | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| JITAI received | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Days post skilled support intervention | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Between-Person Effects | ||||||||||
| Mean individual’s experienced persuasion | 1.28 | [ 0.55, 2.88] | 0.88 | [ 0.63, 1.21] | 1.06 | [ 0.79, 1.41] | 0.26 | [-0.33, 0.84] | 2.14 | [0.51, 9.54] |
| Mean partner’s experienced persuasion | 1.06 | [ 0.46, 2.40] | 0.91 | [ 0.66, 1.25] | 0.98 | [ 0.73, 1.31] | 0.31 | [-0.26, 0.90] | 2.35 | [0.48, 13.45] |
| Mean individual’s experienced pressure | 0.14*** | [ 0.04, 0.45] | 0.77 | [ 0.36, 1.67] | 1.02 | [ 0.76, 1.38] | -0.26 | [-0.83, 0.30] | 37.03** | [3.10, 706.32] |
| Mean partner’s experienced pressure | 0.31* | [ 0.09, 0.95] | 0.53 | [ 0.25, 1.15] | 0.96 | [ 0.72, 1.28] | -0.35 | [-0.92, 0.22] | 1.80 | [0.09, 26.68] |
| Mean individual’s experienced pushing | 0.76 | [ 0.21, 2.74] | 1.46 | [ 0.83, 2.60] | 0.91 | [ 0.59, 1.43] | 0.20 | [-0.65, 1.04] | 0.91 | [0.07, 10.72] |
| Mean partner’s experienced pushing | 1.60 | [ 0.45, 5.78] | 1.46 | [ 0.82, 2.60] | 1.11 | [ 0.72, 1.74] | 0.16 | [-0.69, 0.99] | 0.07* | [0.00, 0.98] |
| Mean weartime | NA | NA | NA | NA | 1.00 | [ 1.00, 1.00] | NA | NA | NA | NA |
| Mean individual’s received support | 1.30 | [ 1.00, 1.70] | 1.12* | [ 1.02, 1.23] | 1.07 | [ 0.98, 1.16] | 0.15 | [ 0.00, 0.31] | 0.73 | [0.36, 1.49] |
| Mean partner’s received support | 1.48** | [ 1.14, 1.92] | 0.97 | [ 0.89, 1.07] | 1.00 | [ 0.92, 1.09] | -0.09 | [-0.24, 0.07] | 0.80 | [0.45, 1.36] |
| Difference study group 2 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Difference study group 3 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |
| Random Effects | ||||||||||
| sd(Intercept) | 0.84 | [0.64, 1.13] | 0.31 | [0.24, 0.42] | 0.30 | [0.23, 0.40] | 0.61 | [0.48, 0.80] | 1.28 | [0.82, 1.96] |
| sd(Daily individual’s experienced persuasion) | 0.17 | [0.01, 0.40] | 0.11 | [0.07, 0.16] | 0.05 | [0.02, 0.08] | 0.04 | [0.00, 0.10] | 0.28 | [0.02, 0.60] |
| sd(Daily partner’s experienced persuasion) | 0.18 | [0.01, 0.41] | 0.08 | [0.04, 0.13] | 0.05 | [0.02, 0.09] | 0.07 | [0.01, 0.12] | 0.55 | [0.15, 1.11] |
| sd(Daily individual’s experienced pressure) | 0.24 | [0.01, 0.90] | 0.06 | [0.00, 0.22] | 0.04 | [0.00, 0.13] | 0.07 | [0.00, 0.26] | 1.02 | [0.09, 2.41] |
| sd(Daily partner’s experienced pressure) | 0.50 | [0.03, 1.37] | 0.05 | [0.00, 0.18] | 0.03 | [0.00, 0.11] | 0.07 | [0.00, 0.26] | 0.88 | [0.04, 2.96] |
| sd(Daily individual’s experienced pushing) | 0.50 | [0.16, 0.94] | 0.09 | [0.01, 0.16] | 0.07 | [0.01, 0.15] | 0.05 | [0.00, 0.14] | 0.27 | [0.02, 0.68] |
| sd(Daily partner’s experienced pushing) | 0.19 | [0.01, 0.55] | 0.07 | [0.01, 0.15] | 0.03 | [0.00, 0.10] | 0.06 | [0.00, 0.16] | 0.29 | [0.01, 1.09] |
| Additional Parameters | ||||||||||
| sigma | NA | NA | 0.66 | [0.64, 0.69] | 0.57 | [0.56, 0.59] | 0.95 | [0.93, 0.97] | NA | NA |
Analyses were conducted using the R Statistical language (version 4.4.2; R Core Team, 2024) on Windows 11 x64 (build 26100)